package com.yxx.servicealbum.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yxx.model.album.AlbumInfo;
import com.yxx.query.album.AlbumInfoQuery;
import com.yxx.vo.album.AlbumListVo;
import com.yxx.vo.album.AlbumStatVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author yuxiangxun
 * @date 2025/3/16
 * @apiNote
 */
@Mapper
public interface AlbumInfoMapper extends BaseMapper<AlbumInfo> {
    IPage<AlbumListVo> selectUserAlbumPage(Page<AlbumListVo> albumInfoPage,@Param("vo") AlbumInfoQuery albumInfoQuery);

    /**
     * 根据专辑Id 获取到统计信息
     * @param albumId
     * @return
     */
    AlbumStatVo selectAlbumStat(@Param("albumId") Long albumId);

    void updateStat(@Param("albumId") Long albumId,@Param("statType") String statType, @Param("count") Integer count);
}
